var params = {"taskName":"吸尘器,微波炉-美的-2018-10-月表-天猫-销额","companyId":"5","categoryId":"25,9","category":"吸尘器,微波炉","brand":"美的","platform":"天猫,淘宝","platformId":"1,2","tradeName":"厨房电器","reportType":"month","trade":"white","tradeId":"white","userAccount":"demo_admin","startTime":"2018-10-01 00:00:00","endTime":"2018-10-31 23:59:59","qoqStartTime":"2018-09-01 00:00:00","qoqEndTime":"2018-09-30 23:59:59","yoyStartTime":"2017-10-01 00:00:00","yoyEndTime":"2017-10-31 23:59:59"}
var reportList = [
	// 开头
	{
		name: '封面',
		type: 'frontCover',
		option: {
			title: '5月厨热天猫零售分析报告'
		}
	},
	{
		name: '数据说明',
		type: 'introduction',
		option: {
			params,
			platform: '天猫',
			startTime: '2018-10-01',
			categoryId: '5,9',
			category: '电热水器、燃热水器'
		}
	},
	{
		name: '目录',
		type: 'menu',
		option: {
			params,
			category,
			curCategory: 'all'
		}
	},
	{
		name: '5月厨热行业概览',
		type: 'table',
		type: 'industryOverview',
		option: {
			params,
			title: month + tradeName + '行业各品类概览',
			summary: '美的5月销额25223.5万元（环比+2.7%），销额占比21.6%（环比+0.9%）。',
			sql: 'sql',
			sqlId: 'gxt.brand.sale.sum',
			dataSource: '观星台-行业罗盘-行业汇总分析-行业概况分析。',
			topNum: 10,

		}
	},
	{
		name: '美的厨热各品类概览',
		type: 'table',
		type: 'industryEachCategoryOverview',
		option: {
			params,
			title: brand + tradeName + '各品类概览',
			summary: '电热水器销额最高，为6699.9万元（环比+9.2%），电热水器销额市场份额最大，为43.3%（环比+4.7%）。',
			category: '',
			categoryId: tradeCategoryId,
			sql: 'sql',
			sqlId: 'gxt.category.sale.sum',
			dataSource: '观星台-行业罗盘-行业汇总分析-单品牌行业表现。',
			topNum: 10,
		}
	},
	{
		name: '厨热行业销额趋势',
		type: 'bar&line',
		type: 'industrySalesAmountTrend',
		option: {
			params,
			title: tradeName + '行业销额趋势',
			sql: 'sql',
			sqlId: 'gxt.brand.sale.sum.trend',
			dateFormat: '%Y%m',
			dataSource: '观星台-行业罗盘-行业汇总分析-行业概况分析。',
			summary: '行业销额：18年5月同比29.5%，1-5月累计同比31.4%。<br>美的份额： 18年5月同比-0.6%，1-5月累计同比-0.8%。',
		}
	},
	{
		name: '美的店铺口碑表现',
		type: 'table',
		type: 'brandKoubeiPerformance',
		option: {
			params,
			title: brand + '店铺口碑表现',
			sql: 'es',
			sqlId: '/monthlyReport/shopWordMouth',
			summary: '购买体验：苏宁易购官方旗舰店差评率最高（18.1%），苏宁易购官方旗舰店差评率上升最明显（+2.6%）。<br>售后服务：苏宁易购官方旗舰店差评率最高（15.9%），美的净水官方旗舰店差评率上升最明显（+3.0%）。',
			dataSource: '观星台-电商参谋-单品牌电商分析-店铺服务分析。'
		}
	},
	// 每个品类
	{
		name: '目录',
		type: 'menu',
		option: {
			params,
			category,
			curCategory: '抽油烟机'
		}
	},
	{
		name: '5月抽油烟机行业概览',
		type: 'table',
		type: 'categoryOverview',
		option: {
			params,
			title: month + category + '行业概览'
			sql: 'sql',
			sqlId: 'gxt.brand.sale.sum',
			topNum: 10,
			dataSource: '观星台-行业罗盘-行业汇总分析-行业概况分析。',
			summary: '美的5月销额1902.1万元（环比+12.5%），销额占比16.7%（环比-0.3%）。'
		}
	},
	{
		name: '抽油烟机销额趋势',
		type: 'bar&line',
		type: 'categorySalesAmountTrend',
		option: {
			params,
			title: category + '销额趋势',
			sql: 'sql',
			sqlId: 'gxt.brand.sale.sum.trend',
			dataSource: '观星台-行业罗盘-行业汇总分析-行业概况分析。',
			summary: '行业销额：18年5月同比60.5%，1-5月累计同比45.6%。<br>美的份额： 18年5月同比-1.8%，1-5月累计同比-0.5%。'
		}
	},
	{
		name: '分价格段美的表现',
		type: 'table',
		type: 'pricesegBrandPerformance',
		option: {
			params,
			title: '分价格段' + brand + '表现',
			sql: 'sql',
			sqlId: 'gxt.brand.priceseg.sale.sum',
			dataSource: '观星台-品牌军师-单品牌分析-品牌市场分析。',
			summary: '行业情况：占比提升最大的区间是1000元以下（+5.1%），占比下降最大的是区间是2500-3000元（-3.6%）。<br>美的表现：份额提升最大的区间是3500-4000元（+29.4%），份额下降最大的是区间是1000-1500元（-6.8%）。'
		}
	},
	{
		name: '1000元以下爆款',
		type: 'table&table',
		type: 'pricesegHot',
		option: {
			params,
			title: priceseg + '爆款',
			categoryId,
			sql: 'sql',
			sqlId: 'gxt.brand.priceseg.sale.sum',
			dataSource: '观星台-行业罗盘-品类竞争分析-品牌竞争分析。',
			summary: '博莱克 BLK-888销额最高（524.1万元）；米蒙 EQ07销额增量最高（+224.0万元）。'
			topNum: 10,
		}
	}

	// 结尾
	{
		name: '美的痛点分析',
		type: 'bar&table',
		type: 'brandPainPointAnalysis',
		option: {
			params,
			title: brand + '痛点分析',
			sql: 'es',
			sqlId: '/monthlyReport/painPointAnalysis',
			summary: '主要痛点：噪音整体评价（环比+0.02%）、使用整体评价（环比+0.04%）、价格（环比+0.21%）。',
			dataSource: '观星台-品牌军师-单品牌分析-品牌口碑分析。'
		}
	},
	{
		name: '美的产品口碑分析',
		type: 'table',
		type: 'brandProductKoubeiAnalysis',
		option: {
			params,
			title: brand + '产品口碑分析',
			sql: 'es',
			sqlId: '/monthlyReport/productWordMouth',
			summary: 'CXW-200-DT520RW和CXW-180-DJ118差评数最高，差评率为6.7%（环比-1.6%）、8.2%（环比+2.9%）。',
			dataSource: '观星台-品质卫士-产品品质分析-品质分析（评论）。'
		}
	},
	{
		name: '封底',
		type: 'backCover'
	}
]

var reportStruct = [
	{
		report_id: 1,
		type: 'frontCover',
		name: '封面',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="logo-img" alt="logo"></div><div class="report bg-grey"><h1 class="report-main-title">${title}</h1><h2 class="report-main-sub-title"><span>开普勒·观星台</span></h2></div></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 2,
		type: 'introduction',
		name: '数据说明',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">数据说明</h1><div class="report-content"><div class="blub"></div><ul class="report-ul"><li><span>数据来源：</span>开普勒观星台（ http://k.midea.com ）</li><li><span>销售数据：</span>${platform}(${startTime})</li><li><span>数据来源口径：</span>品类包括${category}</li></ul></div></div></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 3,
		type: 'menu',
		name: '目录',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="menu-title"><span>目录</span></h1><div class="menu-list"><div class="menu-item active"><span class="menu-num">01</span><b></b><span class="menu-item-title">多品类分析</span></div><div class="menu-item"><span class="menu-num">02</span><b></b><span class="menu-item-title">抽油烟机分析</span></div></div></div></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 4,
		type: 'industryOverview',
		name: '行业总览',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">5月厨热行业概览</h1><h2 class="report-sub-title">美的5月销额25223.5万元（环比<span class="color-red">+2.7%</span>），销额占比21.6%（环比<span class="color-red">+0.9%</span>）。</h2><div class="report-table-content"><table class="report-table need-bg"><thead><th>销额排名</th><th>品牌</th><th>销额（万元）</th><th>销额环比</th><th>销额占比</th><th>销额占比环比</th><th>销量（件）</th><th>销量环比</th><th>均价（元）</th><th>均价环比</th><th>差评率</th><th>差评率环比</th></thead><tbody><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr></tbody></table></div><p class="report-tips">数据来源：观星台-电商参谋-单品牌电商分析-店铺服务分析。</p></div></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 5,
		type: 'industryEachCategoryOverview',
		name: '行业各品类概览',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">美的厨热各品类概览</h1><h2 class="report-sub-title"><span class="color-red">电热水器</span>销额最高，为6699.9万元（环比<span class="color-red">+9.2%</span>），<span class="color-red">电热水器</span>销额市场份额最大，为43.3%（环比<span class="color-red">+4.7%</span>）。</h2><div class="report-table-content"><table class="report-table need-bg"><thead><th>销额排名</th><th>品类</th><th>销额（万元）</th><th>销额环比</th><th>自身销额占比</th><th>行业销额（万元）</th><th>销额市场份额</th><th>销额份额环比</th><th>美的销量</th><th>美的销量环比</th></thead><tbody><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td></tr></tbody></table></div><p class="report-tips">数据来源：观星台-行业罗盘-行业汇总分析-单品牌行业表现。</p></div></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 6,
		type: 'industrySalesAmountTrend',
		name: '行业销额趋势',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">厨热行业销额趋势</h1><h2 class="report-sub-title"><span class="font-bold">行业销额：</span>18年5月同比29.5%，1-5月累计同比31.4%。</h2><h2 class="report-sub-title"><span class="font-bold">美的份额：</span>18年5月同比<span class="color-red">-0.6%</span>，1-5月累计同比<span class="color-red">-0.8%</span>。</h2><div class="report-chart-content"><h3>行业及美的月度<span class="color-red">销额</span>趋势</h3><div class="report-chart" id="chart04"></div></div></div><p class="report-tips">数据来源：观星台-行业罗盘-行业汇总分析-行业概况分析。</p></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 7,
		type: 'brandKoubeiPerformance',
		name: '品牌店铺口碑表现',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">美的店铺口碑表现</h1><h2 class="report-sub-title"><span class="font-bold">行业销额：</span>18年5月同比29.5%，1-5月累计同比31.4%。</h2><h2 class="report-sub-title"><span class="font-bold">美的份额：</span>18年5月同比<span class="color-red">-0.6%</span>，1-5月累计同比<span class="color-red">-0.8%</span>。</h2><div class="report-table-content"><table class="report-table"><thead><tr><th rowspan="2">评论数排名</th><th rowspan="2">店铺名称</th><th rowspan="2">平台</th><th rowspan="2">评论数</th><th colspan="2" class="bg-green">购买体验</th><th colspan="2" class="bg-yellow">售后服务</th><th rowspan="2">销额（万元）</th></tr><tr><th class="bg-green" width="100">差评率</th><th class="bg-green" width="100">环比</th><th class="bg-yellow" width="100">差评率</th><th class="bg-yellow" width="100">环比</th></tr></thead><tbody><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td></tr></tbody></table></div><p class="report-tips">数据来源：观星台-电商参谋-单品牌电商分析-店铺服务分析。</p></div></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 8,
		type: 'categoryOverview',
		name: '品类行业总览',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">5月抽油烟机行业概览</h1><h2 class="report-sub-title">美的5月销额1902.1万元（环比+12.5%），销额占比16.7%（环比<span class="color-red">-0.3%</span>）。</h2><div class="report-table-content"><table class="report-table need-bg"><thead><th>销额排名</th><th>品牌</th><th>销额（万元）</th><th>销额环比</th><th>销额占比</th><th>销额占比环比</th><th>销量（件）</th><th>销量环比</th><th>均价（元）</th><th>均价环比</th><th>差评率</th><th>差评率环比</th></thead><tbody><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr></tbody></table></div><p class="report-tips">数据来源：观星台-行业罗盘-行业汇总分析-行业概况分析。</p></div></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 9,
		type: 'categorySalesAmountTrend',
		name: '品类销额趋势',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">抽油烟机销额趋势</h1><h2 class="report-sub-title"><span class="font-bold">行业销额：</span>18年5月同比29.5%，1-5月累计同比31.4%。</h2><h2 class="report-sub-title"><span class="font-bold">美的份额：</span>18年5月同比<span class="color-red">-0.6%</span>，1-5月累计同比<span class="color-red">-0.8%</span>。</h2><div class="report-chart-content"><h3>行业及美的月度<span class="color-red">销额</span>趋势</h3><div class="report-chart" id="chart02"></div></div></div><p class="report-tips">数据来源：观星台-行业罗盘-行业汇总分析-行业概况分析。</p></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 10,
		type: 'pricesegBrandPerformance',
		name: '分价格段美的表现',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">分价格段美的表现</h1><h2 class="report-sub-title"><span class="font-bold">行业情况：</span>占比提升最大的区间是1000元以下（<span class="color-red">+5.1%</span>），占比下降最大的是区间是2500-3000元（<span class="color-red">-3.6%</span>）。</h2><h2 class="report-sub-title"><span class="font-bold">美的表现：</span>份额提升最大的区间是3500-4000元（<span class="color-red">+29.4%</span>），份额下降最大的是区间是1000-1500元（<span class="color-red">-6.8%</span>）。</h2><div class="report-chart-content"><h3>行业及美的<span class="color-red">各价格段</span>销额情况</h3><table class="report-table need-bg"><thead><th>价格段</th><th>行业销额结构</th><th>行业销额结构-环比</th><th>美的销额占比</th><th>美的销额占比-环比</th></thead><tbody><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr></tbody></table></div></div><p class="report-tips">数据来源：观星台-品牌军师-单品牌分析-品牌市场分析。</p></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 11,
		type: 'pricesegHot',
		name: '价格段爆款',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">1000元以下爆款</h1><h2 class="report-sub-title"><span class="font-bold color-red">博莱克 BLK-888</span>销额最高（524.1万元）；<span class="font-bold color-red">米蒙 EQ07</span>销额增量最高（+224.0万元）。</h2><div class="report-table-content flex align-items-center justify-content-between"><div class="flex-1 margin-right-50"><h3>1000元以下<span class="color-red">销额</span>TOP10爆款</h3><table class="report-table"><thead><th>排名</th><th>品牌</th><th>型号</th><th>销额（万元）</th><th>均价（元）</th><th>均价环比</th><th>销量（件）</th><th>销量环比</th></thead><tbody><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr></tbody></table></div><div class="flex-1"><h3>1000元以下<span class="color-red">销额增量</span>TOP10爆款</h3><table class="report-table"><thead><th>排名</th><th>品牌</th><th>型号</th><th>销额增量（万元）</th><th>均价（元）</th><th>均价环比</th><th>销量（件）</th><th>销量环比</th></thead><tbody><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr></tbody></table></div></div></div><p class="report-tips">数据来源：观星台-行业罗盘-品类竞争分析-品牌竞争分析。</p></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 12,
		type: 'brandPainPointAnalysis',
		name: '品牌痛点分析',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><p class="report-tips">数据来源：观星台-品牌军师-单品牌分析-品牌口碑分析。</p></div></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 13,
		type: 'brandProductKoubeiAnalysis',
		name: '品牌产品口碑分析',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="bg-grey"><h1 class="report-title">美的产品口碑分析</h1><h2 class="report-sub-title"><span class="color-red">CXW-200-DT520RW</span>和<span class="color-red">CXW-180-DJ118</span>差评数最高，差评率为6.7%（环比<span class="color-red">-1.6%</span>）、8.2%（环比<span class="color-red">+2.9%</span>）。</h2><div class="report-table-content"><h3>美的差评数TOP10产品口碑分析-按<span class="color-red">产品体验</span></h3><table class="report-table"><thead><th>差评数排名</th><th>差评数排名</th><th>差评数</th><th>评论数</th><th>差评率</th><th>差评率环比</th></thead><tbody><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td></tr><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td></tr></tbody></table></div><p class="report-tips">数据来源：观星台-品质卫士-产品品质分析-品质分析（评论）。</p></div></div></div>',
		script: '<script type="text/javascript"></script>',
	},
	{
		report_id: 14,
		type: 'backCover',
		name: '封底',
		html: '<div class="slideLi_jin"><div class="slidLi_Jin"><div class="logo-img" alt="logo"></div><div class="report bg-grey"><h1 class="report-main-title">感谢您的关注</h1></div></div></div>',
		script: '<script type="text/javascript"></script>',
	}
]


function getPriceArr (priceseg) {
	var lowPrice = '';
	var highPrice = '';
	if (priceseg && priceseg.length > 0) {
		if (priceseg.indexOf('以下') > -1) {
			highPrice = parseInt(priceseg);
		} else if (priceseg.indexOf('以上') > -1) {
			lowPrice = parseInt(priceseg);
		} else if (priceseg.indexOf('-') > -1) {
			var arr = priceseg.split('-');
			lowPrice = arr[0];
			highPrice = arr[1];
		}
	}
	return [lowPrice, highPrice];
}